package cn.zyq.demo.beans.sys;


import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;


/**
 * 定时任务调度日志表
 * 2023-05-12 20:14:08
 */
@Entity
@Table(name ="`sysJobLog`")
@Data
public class SysJobLog implements Serializable {

	private static final long serialVersionUID = 664296510496758423L;

	/**
	 * 任务日志ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "JDBC")
	@Column(name = "`sysJobLogID`")
	@ApiModelProperty("任务日志ID")
	private Integer sysJobLogID;

	/**
	 * 表记录创建时间
	 */
	@ApiModelProperty(hidden = true)
	@Column(name = "`createTime`")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime createTime;

	/**
	 * 任务名称
	 */
	@Column(name = "`jobName`")
	@ApiModelProperty("任务名称")
	private String jobName;

	/**
	 * 任务组名
	 */
	@Column(name = "`jobGroup`")
	@ApiModelProperty("任务组名")
	private String jobGroup;

	/**
	 * 调用目标字符串
	 */
	@Column(name = "`invokeTarget`")
	@ApiModelProperty("调用目标字符串")
	private String invokeTarget;

	/**
	 * 日志信息
	 */
	@Column(name = "`jobMessage`")
	@ApiModelProperty("日志信息")
	private String jobMessage;

	/**
	 * 执行状态（0正常 1失败）
	 */
	@Column(name = "`status`")
	@ApiModelProperty("执行状态（0正常 1失败）")
	private String status;

	/**
	 * 异常信息
	 */
	@Column(name = "`exceptionInfo`")
	@ApiModelProperty("异常信息")
	private String exceptionInfo;


	/** 开始时间 */
	@Transient
	private Date startTime;

	/** 停止时间 */
	@Transient
	private Date stopTime;
}
